package com.zxp.cloud.core.config;

import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author shollin
 * @desc
 * @date 2021/7/18/018 10:40
 */
@Configuration
@AutoConfigureAfter(LoadBalancerAutoConfiguration.class)
public class ZxpCloudBeanConfiguration {

    @Bean
    @LoadBalanced
    RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
